Optimal. Leaf size=43 \[ -\frac {(a+b) \log (1-\sin (c+d x))}{2 d}+\frac {(a-b) \log (1+\sin (c+d x))}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {2747, 647, 31}
\begin {gather*} \frac {(a-b) \log (\sin (c+d x)+1)}{2 d}-\frac {(a+b) \log (1-\sin (c+d x))}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 647
Rule 2747
Rubi steps
\begin {align*} \int \sec (c+d x) (a+b \sin (c+d x)) \, dx &=\frac {b \text {Subst}\left (\int \frac {a+x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {(a-b) \text {Subst}\left (\int \frac {1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}+\frac {(a+b) \text {Subst}\left (\int \frac {1}{b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}\\ &=-\frac {(a+b) \log (1-\sin (c+d x))}{2 d}+\frac {(a-b) \log (1+\sin (c+d x))}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 26, normalized size = 0.60 \begin {gather*} \frac {a \tanh ^{-1}(\sin (c+d x))}{d}-\frac {b \log (\cos (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 32, normalized size = 0.74
method | result | size |
derivativedivides | \(\frac {a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )-b \ln \left (\cos \left (d x +c \right )\right )}{d}\) | \(32\) |
default | \(\frac {a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )-b \ln \left (\cos \left (d x +c \right )\right )}{d}\) | \(32\) |
norman | \(\frac {b \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (a -b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {\left (a +b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(62\) |
risch | \(i b x +\frac {2 i b c}{d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b}{d}\) | \(90\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 35, normalized size = 0.81 \begin {gather*} \frac {{\left (a - b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (a + b\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 37, normalized size = 0.86 \begin {gather*} \frac {{\left (a - b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (a + b\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.04, size = 37, normalized size = 0.86 \begin {gather*} \frac {{\left (a - b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - {\left (a + b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 54, normalized size = 1.26 \begin {gather*} -\frac {\frac {a\,\ln \left (\sin \left (c+d\,x\right )-1\right )}{2}-\frac {a\,\ln \left (\sin \left (c+d\,x\right )+1\right )}{2}+\frac {b\,\ln \left (\sin \left (c+d\,x\right )-1\right )}{2}+\frac {b\,\ln \left (\sin \left (c+d\,x\right )+1\right )}{2}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________